/* 
 * File:   bitwise.h
 * Author: bluecat
 *
 * Created on 2011年4月20日, 上午11:21
 */

#ifndef BITWISE_H
#define	BITWISE_H

#ifdef	__cplusplus
extern "C" {
#endif




#ifdef	__cplusplus
}
#endif

#endif	/* BITWISE_H */

#include <string>

static const int MAX_POS = 15;
static const int MIN_POS = 0;
static const int BIT_LENGTH = 16;
void reset(unsigned int* data, int pos);
void reset(unsigned int* data);
void set(unsigned int* data, int pos);
void set(unsigned int* data);
void flip(unsigned int* data);
void flip(unsigned int* data, int pos);
bool test(const unsigned int* data, int pos);
short count(const unsigned int* data);
bool check(int pos);
std::string toString(const unsigned int* data);